package com.coocaa.ops.plus.dashboard.v1.codegen.service;


import com.coocaa.ops.common.core.base.model.PageResultModel;
import com.coocaa.ops.common.core.base.model.R;
import com.coocaa.ops.plus.dashboard.v1.codegen.model.CodeGenConfigModel;
import com.coocaa.ops.plus.dashboard.v1.codegen.model.TableInfoModel;
import com.coocaa.ops.plus.dashboard.v1.codegen.model.output.FrontConfigInfo;
import com.coocaa.ops.plus.dashboard.v1.codegen.model.query.DbTableQueryModel;

import javax.servlet.http.HttpServletRequest;


/**
 * @author : bijiahao
 * @date : 2019/4/20.
 * @description:
 */
public interface ICodeGenService {
    /**
     * 执行代码生成
     *
     * @param model
     */
    R execCodeGen(CodeGenConfigModel model) throws Exception;

    /**
     * 配置信息
     *
     * @return
     */
    FrontConfigInfo configInfo(HttpServletRequest request);

    /**
     * 获取表信息
     *
     * @param model
     * @return
     */
    PageResultModel<TableInfoModel> listTable(DbTableQueryModel model);
    /**
     * 校验数据库连接
     *
     * @param model
     * @return
     */
    R testDbConn(DbTableQueryModel model);

}
